<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Firmware for Arduino | PLEN Project Company Inc.: System.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Firmware for Arduino | PLEN Project Company Inc.
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_system_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">System.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_system_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef PLEN2_SYSTEM_H</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="_system_8h.html#aa595b92b62c5e0c3deb56b315236cc62">   11</a></span>&#160;<span class="preprocessor">#define PLEN2_SYSTEM_H</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_build_config_8h.html">BuildConfig.h</a>&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="_system_8h.html#aa14dc39d52ab121ceb570f1a265385e0">   19</a></span>&#160;<span class="preprocessor">#define FIRMWARE_VERSION &quot;1.4.1&quot;</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">class </span>Stream;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">class </span>__FlashStringHelper;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_p_l_e_n2.html">PLEN2</a></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;{</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="keyword">class </span>System;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;}</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_p_l_e_n2_1_1_system.html">   33</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_p_l_e_n2_1_1_system.html">PLEN2::System</a></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;{</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keyword">const</span> __FlashStringHelper* DEVICE()</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    {</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">        #if TARGET_PLEN14</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;            <span class="keywordflow">return</span> F(<span class="stringliteral">&quot;PLEN.D&quot;</span>);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">        #if TARGET_PLEN20</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            <span class="keywordflow">return</span> F(</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;                <span class="stringliteral">&quot;PLEN2&quot;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;                #<span class="keywordflow">if</span> <a class="code" href="_build_config_8h.html#a59c0eef4710517eabb247d95dfdd7824">TARGET_DEVELOPER_EDITION</a></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                    <span class="stringliteral">&quot;-Dev.&quot;</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                #endif</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            );</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    }</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keyword">const</span> __FlashStringHelper* CODENAME()</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordflow">return</span> F(</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            <span class="stringliteral">&quot;Cytisus&quot;</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            #<span class="keywordflow">if</span> <a class="code" href="_build_config_8h.html#a227d72f33f9d51ed3b8d31c61a699993">TARGET_MIRROR_EDITION</a></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                <span class="stringliteral">&quot;: Mirror Function Supported&quot;</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;            #endif</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        );</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    }</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keyword">const</span> __FlashStringHelper* VERSION() { <span class="keywordflow">return</span> F(<a class="code" href="_system_8h.html#aa14dc39d52ab121ceb570f1a265385e0">FIRMWARE_VERSION</a>); }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keyword">enum</span> { USBSERIAL_BAUDRATE = 2000000L };</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <span class="keyword">enum</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor">        #if TARGET_DEVELOPER_EDITION</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            BLESERIAL_BAUDRATE = 115200L</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor">        #else</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            BLESERIAL_BAUDRATE = 2000000L</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    };</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="class_p_l_e_n2_1_1_system.html#a23b87e3e3aa4ce42096b27f74feb17b2a745f6789a254a4a7c9b1e20f899a569b">   88</a></span>&#160;    <span class="keyword">enum</span> { <a class="code" href="class_p_l_e_n2_1_1_system.html#a23b87e3e3aa4ce42096b27f74feb17b2a745f6789a254a4a7c9b1e20f899a569b">INTERNAL_EEPROMSIZE</a> = 1024 };</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="class_p_l_e_n2_1_1_system.html#a85fc7fa305446f95eb992031ecf1e884">   93</a></span>&#160;    <a class="code" href="class_p_l_e_n2_1_1_system.html#a85fc7fa305446f95eb992031ecf1e884">System</a>() { <a class="code" href="class_p_l_e_n2_1_1_system.html#a1fa27d823e520d0a3660e0eac3c8cad7">begin</a>(); }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_p_l_e_n2_1_1_system.html#a1fa27d823e520d0a3660e0eac3c8cad7">begin</a>();</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <span class="keyword">static</span> Stream&amp; <a class="code" href="class_p_l_e_n2_1_1_system.html#a8090baa1dd19f9a3c6763253aec55134">USBSerial</a>();</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keyword">static</span> Stream&amp; <a class="code" href="class_p_l_e_n2_1_1_system.html#a15c3ae94e90368f45298ad7ab98978fe">BLESerial</a>();</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keyword">static</span> Stream&amp; <a class="code" href="class_p_l_e_n2_1_1_system.html#aa18b2a239cdfd35e0a2fe703224cd07f">inputSerial</a>();</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keyword">static</span> Stream&amp; <a class="code" href="class_p_l_e_n2_1_1_system.html#a5b5cc2f06208c1da871f6656d63c6ee6">outputSerial</a>();</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keyword">static</span> Stream&amp; <a class="code" href="class_p_l_e_n2_1_1_system.html#a540311cd2f3ac13487f9b671be566b2f">debugSerial</a>();</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_p_l_e_n2_1_1_system.html#ac9fb1ec7778810256be49fe19a5b23f2">dump</a>();</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="class_p_l_e_n2_1_1_system.html#af7860331a238c9776f769ac4fbbae095">welcome</a>();</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;};</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;<span class="preprocessor">#endif // PLEN2_SYSTEM_H</span></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_ac9fb1ec7778810256be49fe19a5b23f2"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#ac9fb1ec7778810256be49fe19a5b23f2">PLEN2::System::dump</a></div><div class="ttdeci">static void dump()</div><div class="ttdoc">Dump information of the system. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_a23b87e3e3aa4ce42096b27f74feb17b2a745f6789a254a4a7c9b1e20f899a569b"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#a23b87e3e3aa4ce42096b27f74feb17b2a745f6789a254a4a7c9b1e20f899a569b">PLEN2::System::INTERNAL_EEPROMSIZE</a></div><div class="ttdef"><b>Definition:</b> System.h:88</div></div>
<div class="ttc" id="namespace_p_l_e_n2_html"><div class="ttname"><a href="namespace_p_l_e_n2.html">PLEN2</a></div><div class="ttdef"><b>Definition:</b> AccelerationGyroSensor.h:16</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_a5b5cc2f06208c1da871f6656d63c6ee6"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#a5b5cc2f06208c1da871f6656d63c6ee6">PLEN2::System::outputSerial</a></div><div class="ttdeci">static Stream &amp; outputSerial()</div><div class="ttdoc">Get output-serial instance. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_a1fa27d823e520d0a3660e0eac3c8cad7"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#a1fa27d823e520d0a3660e0eac3c8cad7">PLEN2::System::begin</a></div><div class="ttdeci">static void begin()</div><div class="ttdoc">Static constructor. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_aa18b2a239cdfd35e0a2fe703224cd07f"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#aa18b2a239cdfd35e0a2fe703224cd07f">PLEN2::System::inputSerial</a></div><div class="ttdeci">static Stream &amp; inputSerial()</div><div class="ttdoc">Get input-serial instance. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html">PLEN2::System</a></div><div class="ttdoc">Management class of basis about AVR MCU. </div><div class="ttdef"><b>Definition:</b> System.h:33</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_a15c3ae94e90368f45298ad7ab98978fe"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#a15c3ae94e90368f45298ad7ab98978fe">PLEN2::System::BLESerial</a></div><div class="ttdeci">static Stream &amp; BLESerial()</div><div class="ttdoc">Get BLE-serial instance. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_af7860331a238c9776f769ac4fbbae095"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#af7860331a238c9776f769ac4fbbae095">PLEN2::System::welcome</a></div><div class="ttdeci">static void welcome()</div><div class="ttdoc">Show welcome message. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_a8090baa1dd19f9a3c6763253aec55134"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#a8090baa1dd19f9a3c6763253aec55134">PLEN2::System::USBSerial</a></div><div class="ttdeci">static Stream &amp; USBSerial()</div><div class="ttdoc">Get USB-serial instance. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_a540311cd2f3ac13487f9b671be566b2f"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#a540311cd2f3ac13487f9b671be566b2f">PLEN2::System::debugSerial</a></div><div class="ttdeci">static Stream &amp; debugSerial()</div><div class="ttdoc">Get debug-serial instance. </div></div>
<div class="ttc" id="_build_config_8h_html_a59c0eef4710517eabb247d95dfdd7824"><div class="ttname"><a href="_build_config_8h.html#a59c0eef4710517eabb247d95dfdd7824">TARGET_DEVELOPER_EDITION</a></div><div class="ttdeci">#define TARGET_DEVELOPER_EDITION</div><div class="ttdoc">Configuration macro to build the firmware for developer edition. </div><div class="ttdef"><b>Definition:</b> BuildConfig.h:38</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_system_html_a85fc7fa305446f95eb992031ecf1e884"><div class="ttname"><a href="class_p_l_e_n2_1_1_system.html#a85fc7fa305446f95eb992031ecf1e884">PLEN2::System::System</a></div><div class="ttdeci">System()</div><div class="ttdoc">Constructor. </div><div class="ttdef"><b>Definition:</b> System.h:93</div></div>
<div class="ttc" id="_build_config_8h_html"><div class="ttname"><a href="_build_config_8h.html">BuildConfig.h</a></div><div class="ttdoc">Config file for each build environment. </div></div>
<div class="ttc" id="_build_config_8h_html_a227d72f33f9d51ed3b8d31c61a699993"><div class="ttname"><a href="_build_config_8h.html#a227d72f33f9d51ed3b8d31c61a699993">TARGET_MIRROR_EDITION</a></div><div class="ttdeci">#define TARGET_MIRROR_EDITION</div><div class="ttdoc">Configuration macro to build the firmware for mirror edition. </div><div class="ttdef"><b>Definition:</b> BuildConfig.h:48</div></div>
<div class="ttc" id="_system_8h_html_aa14dc39d52ab121ceb570f1a265385e0"><div class="ttname"><a href="_system_8h.html#aa14dc39d52ab121ceb570f1a265385e0">FIRMWARE_VERSION</a></div><div class="ttdeci">#define FIRMWARE_VERSION</div><div class="ttdoc">Definition of the firmware vesion. </div><div class="ttdef"><b>Definition:</b> System.h:19</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="_system_8h.html">System.h</a></li>
    <li class="footer">Generated on Tue Oct 11 2016 13:20:21 for Firmware for Arduino | PLEN Project Company Inc. by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
